package com.detection.dahua.demo.oauth;

import com.dahuatech.hutool.json.JSONUtil;
import com.dahuatech.icc.exception.ClientException;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.junit.Test;

/**
 * program:java-sdk-demo
 *
 * @Author: 355079
 * @Date:2024-03-08 09:22
 * @Description:鉴权测试类
 */
@Slf4j
@Data
public class OauthDemoTest {

    private OauthDemo oauthDemo;

    public OauthDemoTest() {
        this.oauthDemo = new OauthDemo();
    }

    /**
     * 测试获取公钥
     */
    @Test
    public void testGetPublicKey(){
        oauthDemo.getPublicKey();
    }

    /**
     * 测试获取token
     */
    @Test
    public void testGetToken() throws ClientException {
        System.out.println(JSONUtil.toJsonStr(oauthDemo.getToken()));;
    }


}
